package design_pattern.builder.demo01;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @version 1.0.0
 * Created by cyd on 2022-06-15 14:16:36
 * @ClassName : design_pattern.builder.demo01.ProductPhone
 * @Description : 手机类，直接实现制造流程
 */
@Data
@NoArgsConstructor
public class Phone implements Build {
    private String name;

    private String desc;

    private String software;

    private String typeName;

    private String testResult;

    public Phone(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    @Override
    public void buildType(String typeName) {
        System.out.println("生产原型");
        this.typeName = typeName;
    }

    @Override
    public void installSoft(String software) {
        System.out.println("安装软件");
        this.software = software;
    }

    @Override
    public void testPhone(String testResult) {
        System.out.println("测试手机");
        this.testResult = testResult;
    }

    @Override
    public Phone buildPhone(String snCode) {
        System.out.println("生产手机");
        return this;
    }
}
